<template>
  <div class="role-management">
    <h2>角色管理</h2>
    <el-card class="content-card">
      <el-table :data="roleList" style="width: 100%">
        <el-table-column prop="id" label="ID" width="80" />
        <el-table-column prop="name" label="角色名称" width="120" />
        <el-table-column prop="description" label="描述" />
        <el-table-column prop="permissions" label="权限" width="200" />
        <el-table-column prop="createTime" label="创建时间" width="180" />
        <el-table-column label="操作" width="150">
          <template #default>
            <el-button type="primary" link>编辑</el-button>
            <el-button type="danger" link>删除</el-button>
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script setup>
import { ref } from 'vue'

const roleList = ref([
  {
    id: 1,
    name: '超级管理员',
    description: '系统最高权限',
    permissions: '所有权限',
    createTime: '2024-01-01 12:00:00'
  },
  {
    id: 2,
    name: '普通用户',
    description: '基础功能权限',
    permissions: '查看权限',
    createTime: '2024-01-02 12:00:00'
  }
])
</script>

<style scoped>
.role-management {
  padding: 20px;
}

.content-card {
  margin-top: 20px;
}

h2 {
  margin: 0;
  color: #2c3e50;
}
</style> 